package org.springblade.modules.repair.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zcc
 * @version 1.0
 * @date 2021/6/4 9:45
 */
@Getter
@AllArgsConstructor
public enum PlanContentFormTypeEnum {

	/**
	 * 1-物业端 2-微信 3-服务电话,4:系统派单,5:维保端
	 * 对应数据库表里面的plan_from字段
	 */
	PEOPLE(0, "人工派单"),
	BUILDING(1, "物业端报障"),
	WEIXIN(2, "微信群报障"),
	PHONE(3, "服务电话报障"),
	SYSTEM(4, "系统派单"),
	REPAIR(5,"维保端报障"),
	VISITOR (6,"游客报障"),
	ADMIN(7,"web端"),
	TLW(8, "梯联网报障"),
	EMERGENCY_CALL(9, "一键呼救报障"),
	AI_SERVICE(10, "AI客服报障"),
	;
	final Integer id;
	final String name;

	public static String getName(int id){
		PlanContentFormTypeEnum[] enums = PlanContentFormTypeEnum.values();
		for (PlanContentFormTypeEnum typeEnum : enums) {
			if(typeEnum.getId() == id){
				return typeEnum.getName();
			}
		}
		return null;
	}
}
